//package com.asia5b.a5mall.middleware.utils
//
//import android.content.Context
//import android.graphics.drawable.Drawable
//import android.net.Uri
//import com.bumptech.glide.Glide
//import com.bumptech.glide.load.DataSource
//import com.bumptech.glide.load.engine.GlideException
//import com.bumptech.glide.request.RequestListener
//import com.bumptech.glide.request.target.Target
//
///**
// * Created by zhangyuncai on 2019/12/21.
// */
//class ImageWatchLoader : ImageWatcher.Loader{
//    override fun load(p0: Context, p1: Uri, call: ImageWatcher.LoadCallback) {
//        call.onLoadStarted(null)
//        Glide.with(p0)
//                .load(p1)
//                .listener(object :RequestListener<Drawable>{
//                    override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
//                        call.onResourceReady(resource)
//                        return true
//                    }
//
//                    override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
//                        call.onLoadFailed(null)
//                        return true
//                    }
//
//                })
//                .submit(1000,1000)
//    }
//}